// let React = require("react");
// let ReactDom = require("react-dom");
import React from "react";
import { render } from "react-dom";
// 生成虚拟DOM节点
let arr = [111, 222, 333];
// let oDiv = React.createElement(
//   "div",
//   { id: "box" },
//   //   ["我是子节点"]
//   React.createElement(
//     "ul",
//     null,
//     arr.map((item) => React.createElement("li", null, item))
//   )
// );
let oDiv = React.createElement(
  "div",
  { id: "box" },
  React.createElement(
    "ul",
    null,
    arr.map(item => React.createElement(
      "li",
      null,
      item
    ))
  )
);
render(oDiv, document.getElementById("app"), () => {
  console.log("渲染成功");
});
// console.log(__dirname);
